Menu for WPF | ComponentOne
Menu Overview / Radial Menu / KeyTip and Access Key Feature
In This Topic
    KeyTip and Access Key Feature
    In This Topic

    KeyTip and Access Key feature allows users to interact with C1RadialMenuItem using keyboard commands and shortcut keys instead of a mouse. With support for customization and smooth integration, it enhances keyboard accessibility and navigation efficiency.

    Key Features

    KeyTip Display: Displays a KeyTip on each C1RadialMenuItem when pressing the Alt key

    Access Key Activation: Activates specific menu items when pressing the Alt key followed by the respective AccessKey

    Customizable KeyTips: Users can define custom shortcut letters for each item

    Nested Menu Navigation: Keyboard navigation works with submenus, allowing users to move between the main menu and nested items

    Accessibility Compliance: Enhances the accessibility of the control for individuals who rely on keyboard navigation or assistive technologies

    Required NuGet Packages

    Basic Radial Menu with KeyTips

    Basic Radial Menu with KeyTips allows users to activate items through KeyTips. When the Alt key is pressed, a label appears next to each menu item displaying the corresponding access key. Pressing the indicated key activates the associated item.

     

    The following code demonstrates how to enable Basic Radial Menu with KeyTips.

    C#
    Copy Code
    <c1:C1RadialMenuItem Header="_Add" SectorCount="6">
         <c1:C1RadialMenuItem.Icon>
             <Image Source="../Resources/Menu/e109-Add.48.png"/>
         </c1:C1RadialMenuItem.Icon>
     </c1:C1RadialMenuItem>
    

    Radial Menu with Nested Menu Items

    Each submenu of the C1RadialMenuItem supports KeyTips and AccessKeys, allowing users to navigate between the main menu and the submenus using keyboard shortcuts. 


    The following code demonstrates how to enable Radial Menu with Nested Menu Items.

    C#
    Copy Code
     <c1:C1RadialMenuItem Header="_Add" SectorCount="6">
         <c1:C1RadialMenuItem.Icon>
             <Image Source="../Resources/Menu/e109-Add.48.png"/>
         </c1:C1RadialMenuItem.Icon>
         <c1:C1RadialMenuItem Header="_New" ToolTip="New Item">
             <c1:C1RadialMenuItem.Icon>
                 <Image Source="../Resources/Menu/e1da-Folder.48.png"/>
             </c1:C1RadialMenuItem.Icon>
         </c1:C1RadialMenuItem>
         <c1:C1RadialMenuItem Header="Existing" ToolTip="Existing Item">
             <c1:C1RadialMenuItem.Icon>
                 <Image Source="../Resources/Menu/e132-File.48.png"/>
             </c1:C1RadialMenuItem.Icon>
         </c1:C1RadialMenuItem>
         <c1:C1RadialMenuItem Header="_Folder">
             <c1:C1RadialMenuItem.Icon>
                 <Image Source="../Resources/Menu/e188-Folder.48.png"/>
             </c1:C1RadialMenuItem.Icon>
         </c1:C1RadialMenuItem>
         <c1:C1RadialMenuItem Header="Class">
             <c1:C1RadialMenuItem.Icon>
                 <Image Source="../Resources/Menu/1f4c4-Document.48.png"/>
             </c1:C1RadialMenuItem.Icon>
         </c1:C1RadialMenuItem>
     </c1:C1RadialMenuItem>
    

    Minimalistic Radial Menu with Visual Cues for AccessKey

    In Minimalistic Radial Menu with Visual Cues for AccessKey, each menu item incorporates a corresponding letter or symbol that can be used as the AccessKeys. When the Alt key is pressed, the first letter of the item gets underlined. Pressing the underlined key activates the item.

     

     

    The following code demonstrates how to enable minimalistic Radial Menu with Visual Cues for AccessKey.

    C#
    Copy Code
    <c1:C1RadialMenuItem ToolTip="Clear Text Formatting" Command="{Binding ClearFormatCommand}" DisplayIndex="7">
        <c1:C1RadialMenuItem.Header>
            <AccessText TextWrapping="Wrap" MaxWidth="50" TextAlignment="Center">_Clear Format</AccessText>
        </c1:C1RadialMenuItem.Header>
        <c1:C1RadialMenuItem.Icon>
            <Grid Width="18" Height="18" Margin="-5">
                <Path Stretch="Uniform"  Fill="Black" Data="xxxxx"/>
            </Grid>
        </c1:C1RadialMenuItem.Icon>
    </c1:C1RadialMenuItem>.
    

    Note: When defining AccessKeys using an underscore (e.g. _Add), the underscore also appears in the default tooltip (e.g. _Add). To avoid this, explicitly define a ToolTip without the underscore. For instance;

    C#
    Copy Code
    <c1:C1RadialMenuItem Header="_Add" ToolTip="Add" />